package com.dongqi.utils.ezviz;

/**
 * @Description 视频设备accessToken
 * @Date 2021-05-21
 * @Author dongqi
 */
public class AccessToken {

    private String accessToken;

    private long expireTime;

    public String getAccessToken() {
        return accessToken;
    }

    public void setAccessToken(String accessToken) {
        this.accessToken = accessToken;
    }

    public long getExpireTime() {
        return expireTime;
    }

    public void setExpireTime(long expireTime) {
        this.expireTime = expireTime;
    }

    public AccessToken() {

    }

    public AccessToken(String accessToken, long expireTime) {
        this.accessToken = accessToken;
        this.expireTime = expireTime;
    }

    /**
     * 判断access_token是否过期
     * @return
     */
    public boolean isExpired(){
        return System.currentTimeMillis()>expireTime;
    }
}
